import QtQuick 2.0
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2

Rectangle{
    width: 150; height: 75
    id: root
    radius: 15
    property string label: ""
    property color hoveredColor: "gold"
    property color buttonColor: "lightblue"
    property color borderColor: "white"
    signal buttonClicked
    onButtonClicked: { console.log( label + " button clicked. ")}
    Button{
        anchors.fill: parent
        id: botton
        Text {
            text: label
            anchors.centerIn: parent
            font {bold: true; pixelSize: 18; family: "source code pro"}
        }
        style: ButtonStyle{
            id: btnStyle
            background: Rectangle{
                border.width: 5
                border.color: borderColor
                color: control.hovered? hoveredColor:buttonColor
                radius: root.radius
            }
        }
        onClicked: { buttonClicked(); }
    }
}

